package website.digitalocean.chapter16;

import lombok.extern.slf4j.Slf4j;

/**
 * @author: longhc@citycloud.com.cn
 * @since: 2023/2/16 9:47
 * @version: 1.0
 */
@Slf4j
public class CreditCardStrategy implements PaymentStrategy {

    private String name;
    private String carNumber;
    private String cvv;
    private String dateOfExpiry;

    public CreditCardStrategy(String name, String carNumber, String cvv, String dateOfExpiry) {
        this.name = name;
        this.carNumber = carNumber;
        this.cvv = cvv;
        this.dateOfExpiry = dateOfExpiry;
    }

    @Override
    public void pay(int amount) {
        log.info("使用信用卡支付; amount:{}", amount);
    }
}
